package com.rabbit.eap.system.service;

import com.rabbit.eap.framework.common.api.ApiResult;
import com.rabbit.eap.system.entity.SysUser;
import com.rabbit.eap.system.param.LoginParam;
import com.rabbit.eap.system.vo.LoginSysUserTokenVO;

import javax.servlet.http.HttpServletRequest;

/**
 * @projectName eap
 * @packageName com.rabbit.eap.system.service
 * @className LoginService
 * @author： rabbit
 * @version： 1.0
 * @since： 2020/4/30 16:51
 * <p>Description: LoginService
 * 登录服务接口
 * </p>

 */
public interface LoginService {
    /**
     * 登录
     *
     * @param loginParam
     * @return
     * @throws Exception
     */
    ApiResult<LoginSysUserTokenVO> login(LoginParam loginParam) throws Exception;


    /**
     * 退出
     * @param request
     * @throws Exception
     */
    void logout(HttpServletRequest request) throws Exception;


    /**
     * 检查验证码是否正确
     *
     * @param verifyToken
     * @param code
     * @throws Exception
     */
    void checkVerifyCode(String verifyToken, String code) throws Exception;

    SysUser getSysUserByUsername(String username) throws Exception;
}
